<?php

namespace App\Models\Virtual;

use Illuminate\Database\Eloquent\Model;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Relations;
use App\Models\Data\ClickLearn;

class VirtualWord extends Model
{
    use HasDateTimeFormatter;

    protected $table = 'virtual_words';
    protected $fillable = ['id', 'virtual_id', 'type', 'time', 'click_learn_id'];

    public function click_learn(): Relations\BelongsTo
    {
        return $this->belongsTo(ClickLearn::class);
    }

    public function virtual(): Relations\BelongsTo
    {
        return $this->belongsTo(Virtual::class);
    }
}
